<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>DHCP-User</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="ODTONE 0.4">
<link rel="up" href="../app.html" title="Applications">
<link rel="prev" href="miis_index.html" title="MIIS Server">
<link rel="next" href="dns_usr_index.html" title="DNS-User">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src="../.././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="miis_index.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../app.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dns_usr_index.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="odtone.app.dhcp_usr_index"></a><a class="link" href="dhcp_usr_index.html" title="DHCP-User">DHCP-User</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart">Compilation
        dependencies</a></span></dt>
<dt><span class="section"><a href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart">Getting
        Started</a></span></dt>
</dl></div>
<p>
        The DHCP-User was implemented in order to enable the discovery of PoS entities
        according to the guidelines depicted in the RFC5678. It is a modification
        of the &#8221;dhclient&#8221; software, which was extended to support the IEEE 802.21
        standard and communicate via MIH protocol.
      </p>
<p>
        The DHCP-User has two modes of discovery operations: explicit discovery or
        bootstrap discovery. In the explicit discovery, the discovery process is
        initiated by a MIH-User, while at the boostrap discovery the available PoS
        entities are discovered during the aquisition of IP address.
      </p>
<p>
        In the explicit discovery, the discovery process is triggered by the reception
        of a "MIH_Capability_Discover.indication" message. In the bootstrap
        discovery, the process is triggered by a "Link_Up.indication" message
        (which indicates the occurence of a L2 attachement). In both cases the discovered
        entities are grouped in one single message and are forwarded to the MIHF
        through a "MIH_Capability_Discover.response" message.
      </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
          The DHCP-User is working only for Linux.
        </p></td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
          ODTONE also provides the DHCP server application, which is an modified
          version of the "dhcpd" supporting the IEEE 802.21 DHCP options.
        </p></td></tr>
</table></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart"></a><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart" title="Compilation dependencies">Compilation
        dependencies</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Bind9 library
            </li>
<li class="listitem">
              libisc library
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart"></a><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart" title="Compilation dependencies">Getting
        Started</a>
</h4></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.registering_with_the_mihf">Registering
          with the MIHF</a></span></dt>
<dt><span class="section"><a href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration">Configuration</a></span></dt>
<dt><span class="section"><a href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.running">Running</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.registering_with_the_mihf"></a><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.registering_with_the_mihf" title="Registering with the MIHF">Registering
          with the MIHF</a>
</h5></div></div></div>
<p>
            The DHCP-User does not need provide any information during the registration
            process. To give this entity the discovery role, it must be configured
            in the MIHF using the following option:
</p>
<pre class="programlisting">[mihf]
discovery = DHCP
</pre>
<p>
          </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration"></a><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration" title="Configuration">Configuration</a>
</h5></div></div></div>
<pre class="programlisting">DHCP-User Configuration:
    --help                           Display configuration options
    --conf.file arg (=dhcp_usr.conf) Configuration File
    --user.id arg (=DHCP)            MIH User ID
    --conf.port arg (=1234)          Listening Port
    --conf.recv_buff_len arg (=4096) Receive Buffer Length
    --user.ip_version arg (=4)       IP Protocol Version (4/6)
    --user.nic arg                   Interface Info List
    --mihf.ip arg (=127.0.0.1)       MIHF Local Communications IP Address
    --mihf.local_port arg (=1025)    MIHF Local Communications Port
</pre>
<p>
            The DHCP-User can be configured based on a set of parameters, which can
            be configured either using an configuration file or passing them directly
            in the command line.
          </p>
<p>
            For defining the network interfaces that the DHCP-User will manage the
            <span class="emphasis"><em>user.nic</em></span> option must be used. It also can only operate
            DHCPv4 or DHCPv6 at a time, not both. To use both protocols simultaneously,
            two instances of the DHCP-User are required, one with the <span class="emphasis"><em>user.ip_version</em></span>
            option set to 6 and other to 4.
          </p>
<h4>
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.h0"></a>
            <span><a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.dhclient_configuration"></a></span><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.dhclient_configuration">dhclient
            configuration</a>
          </h4>
<p>
            The <span class="bold"><strong>dhclient.conf</strong></span> file contains configuration
            information for "dhclient", which is the core of our DHCP-User.
            You must place it on the "/etc/dhclient.conf".
          </p>
<p>
            The <span class="bold"><strong>dhclient.conf</strong></span> file is a free-form
            ASCII text file. It is parsed by the recursive-descent parser built into
            dhclient. The file may contain extra tabs and newlines for formatting
            purposes. Keywords in the file are case-insensitive. Comments may be
            placed anywhere within the file (except within quotes). Comments begin
            with the # character and end at the end of the line.
          </p>
<p>
            The <span class="bold"><strong>dhclient.conf</strong></span> file can be used to
            configure the behaviour of the client in a wide variety of ways: protocol
            timing, information requested from the server, information required of
            the server, defaults to use if the server does not provide certain information,
            values with which to override information provided by the server, or
            values to prepend or append to information provided by the server. The
            configuration file can also be preinitialized with addresses to use on
            networks that don't have DHCP servers.
          </p>
<p>
            <span class="bold"><strong>dhclient.conf</strong></span> example:
          </p>
<p>
</p>
<pre class="programlisting"># IPv4

request subnet-mask, broadcast-address, time-offset, routers,
		domain-name, domain-name-servers, domain-search, host-name,
		netbios-name-servers, netbios-scope, interface-mtu,
		ntp-servers, option-ipv4-address-mos_ip, option-ipv4-address-mos_fqdn
		;

# IPv6

also request dhcp6.option-ipv6-address-mos_ip;
also request dhcp6.option-ipv6-address-mos_fqdn;
</pre>
<p>
          </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
              For more information check the dhclient.conf man pages
            </p></td></tr>
</table></div>
<h4>
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.h1"></a>
            <span><a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.dhcpd_configuration"></a></span><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.configuration.dhcpd_configuration">dhcpd
            configuration</a>
          </h4>
<p>
            The <span class="bold"><strong>dhcpd.conf</strong></span> file contains configuration
            information for dhcpd, the Internet Systems Consortium DHCP Server.
          </p>
<p>
            The <span class="bold"><strong>dhcpd.conf</strong></span> file is a free-form ASCII
            text file. It is parsed by the recursive-descent parser built into dhcpd.
            The file may contain extra tabs and newlines for formatting purposes.
            Keywords in the file are case-insensitive. Comments may be placed anywhere
            within the file (except within quotes). Comments begin with the # character
            and end at the end of the line.
          </p>
<p>
            <span class="bold"><strong>dhcpd.conf</strong></span> example:
          </p>
<p>
</p>
<pre class="programlisting"># IPv4

option domain-name "odtone.test";
option domain-name-servers ns1.odtone.test, ns2.odtone.test;

default-lease-time 600;
max-lease-time 7200;
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
	    authoritative;
	    range 192.168.1.10 192.168.1.30;
	    option option-ipv4-address-mos_ip.is 10.110.1.1;
	    option option-ipv4-address-mos_fqdn.is "odtone.test";
}

# IPv6

default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet6 2000:aaaa:bbbb:cccc::/64 {
	    # Range for clients
	    range6 2000:aaaa:bbbb:cccc::2 2000:aaaa:bbbb:cccc::20;
	    # Additional options
	    option dhcp6.name-servers fec0:0:0:1::1;
	    option dhcp6.domain-search "domain.example";
	    # Prefix range for delegation to sub-routers
	    prefix6 2001:db8:0:100:: 2001:db8:0:f00:: /56;
	    # Example for a fixed host address
	    host specialclient {
	            host-identifier option dhcp6.client-id 00:01:00:01:4a:1f:ba:e3:60:b9:1f:01:23:45;
	            fixed-address6 2001:db8:0:1::127;
	    }

	    option dhcp6.option-ipv6-address-mos_ip 00:01:00:10:fe:80:00:00:00:00:00:00:02:03:1d:ff:fe:07:15:73 ;
	    option dhcp6.option-ipv6-address-mos_fqdn 00:01:00:0d:06:6f:64:74:6f:6e:65:04:74:65:73:74:00 ;
}
</pre>
<p>
          </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
              For more information check the dhcpd.conf man pages
            </p></td></tr>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="odtone.app.dhcp_usr_index.dhcp_usr_getStart.running"></a><a class="link" href="dhcp_usr_index.html#odtone.app.dhcp_usr_index.dhcp_usr_getStart.running" title="Running">Running</a>
</h5></div></div></div>
<p>
            Before running the DHCP-User, the local MIHF should already be running.
            Otherwise, the DHCP-User will try to register with a non-exitent MIHF.
          </p>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Universidade
      Aveiro<br>Copyright &#169; 2009-2012 Instituto
      de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="miis_index.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../app.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dns_usr_index.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
